package uvt.gui.mainframe.subpanel.addsss;

import java.util.ArrayList;

import org.openstreetmap.gui.jmapviewer.Coordinate;

import uvt.map.graph.element.Segment;
import uvt.map.graph.element.Station;

public class CoordinateResources {
	
	private static CoordinateResources instance;
	private Station firstStation;
	private Station stationStart;
	private Coordinate segmentStart;
	private ArrayList<Segment> listSegments;
	
	private CoordinateResources() {
		listSegments = new ArrayList<Segment>();
	}
	
	public static CoordinateResources getInstance() {
		if(instance == null)
			instance = new CoordinateResources();
		return instance;
	}

	public Station getFirstStation() {
		return firstStation;
	}

	public void setFirstStation(Station firstStation) {
		this.firstStation = firstStation;
	}

	public Station getStationStart() {
		return stationStart;
	}

	public void setStationStart(Station stationStart) {
		this.stationStart = stationStart;
	}

	public Coordinate getSegmentStart() {
		return segmentStart;
	}

	public void setSegmentStart(Coordinate segmentStart) {
		this.segmentStart = segmentStart;
	}

	public ArrayList<Segment> getListSegments() {
		return listSegments;
	}

	public void setListSegments(ArrayList<Segment> listSegments) {
		this.listSegments = listSegments;
	}
	
	public void addSegmetInList(Segment seg) {
		listSegments.add(seg);	
	}

}
